package com.jinhua.admin.entity;

import com.jinhua.admin.vo.ProductVo;
import com.jinhua.mybatis.annotation.Column;
import com.jinhua.mybatis.annotation.Table;
import com.jinhua.mybatis.entity.BaseEntity;
import com.jinhua.mybatis.util.AutoGenerateCode;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Copyright
 *
 * @Author WuHuang
 * @Date 2022/2/22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(commit = "商品表", prefix = "do")
public class ProductPo extends BaseEntity<ProductPo> {
    private static final long serialVersionUID = -3922277755488697644L;


    @Column(commit = "库存", length = 10)
    private Integer productCount;

    @Column(commit = "商品名称", length = 10)
    private String name;

    public static void main(String[] args) {
        AutoGenerateCode.generate(ProductPo.class);
    }

    public ProductVo  copyProductVo() {
  ProductVo  vo=new ProductVo();
  org.springframework.beans.BeanUtils.copyProperties(this, vo);
   return vo;
     }

}
